1. Field
One embodiment of the present invention relates to a data refresh apparatus and a data refresh method.
2. Description of the Related Art
In a storage device such as a flash memory and a hard disk device, data tends to be more easily corrupted as the number of times of performed data write-operations increases. The number of data-write operations which can be performed in this type of storage device has a limitation.
When writing data to the storage device, an error bit may occur and the data will be corrupted in some cases. An error-correction code (ECC) is added to the data and stored; therefore, even when the data is corrupted, the data can be corrected.
As an encoding method of the error-correction code, a parity check method, check sum method, CRC method and the like are provided. Jpn. Pat. Appln. KOKAI Publication No. 2004-152194 discloses a memory data protection method which adds to data an error-correction code which is encoded based on an encoding method corresponding to importance of information or frequency of error occurrence.
In the above memory data protection method, the number of times of error detections performed in each block is stored and adequate error detection and adequate correction coding are selected to execute encoding based on the number of times of the error detections. When the number of error detections performed in one block becomes equal to or larger than a certain value, it is considered that an error will reoccur with a high probability and the encoding of information, which is to be written to the block, is changed into an encoding method having high error detection/correction capability. Further, when the number of error detections performed in one block exceeds a predetermined maximum value, it is considered that information cannot be ensured in the block. The information is saved to another block and the above block will not be used any more.
Thus, adding an ECC to data and storing the same allow correction of corrupted data.
In the memory data protection method, however, every time the data is corrected, the corrected data is written in the block to increase the number of times of performed data-write operations. In the case in which the data correction is executed frequently, the number of performed data-write operations approaches to the limit of writing operations. Accordingly, the data becomes easy to be corrupted.
Furthermore, in the above memory data protection method, even in the case where a large portion of data is corrupted, data saving is kept unexecuted until the predetermined maximum number of error detections is executed. Thus, uncorrectable serious data corruption can occur before the number of error detections reaches the predetermined value.